package com.system.insurance.utils;

import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.io.InputStream;

public class InputStreamUtils {
    public static InputStream getInputStream() throws IOException {
//        ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
//        Resource[] resources = resolver.getResources("/apiclient_key.pem");
//        Resource resource = resources[0];
//        System.out.println(resource);
//        InputStream inputStream = resource.getInputStream();
        System.out.println("=====================");
        ClassPathResource classPathResource = new ClassPathResource("static/apiclient_key.pem");
        System.out.println(classPathResource.getPath());
        System.out.println("=====================");
        InputStream inputStream = classPathResource.getInputStream();
        return inputStream;
    }
}
